package edu.upf.grupoe.p2ppicture.SearchEngine.implementations;

import edu.upf.grupoe.p2ppicture.SearchEngine.interfaces.Content;
import java.io.Serializable;
/**
 * This class represents a content which is composed by a Thumbnail and a DescriptionContent
 */

public class ContentImpl implements Content, Serializable{

    private DescriptionContentImpl DC = new DescriptionContentImpl(null, null);
    private ThumbnailImpl thumbnail = new ThumbnailImpl("");

    /**
     * This method sets a thumbnail to a content
     * @param thumbnail ThumbnailImpl
    */
    public void setThumbnail(ThumbnailImpl thumbnail) {
        this.thumbnail = thumbnail;
    }
    /**
     * This method sets a DescriptionContent to a content
     * @param DC DescriptionContentImpl
     */
    public void setDescriptionContent(DescriptionContentImpl DC) {
        this.DC = DC;
    }
    /**
     * This method returns a content DescriptionContent
     * @return DescriptionContentImpl
     */
    public DescriptionContentImpl getDescriptionContent() {
        return DC;
    }
    /**
     * This method returns a content Thumbnail
     * @return ThumbnailImpl
     */
    public ThumbnailImpl getThumbnail() {
        return thumbnail;
    }
    /**
     * Content constructor
     * @param thumbnail ThumbnailImpl
     * @param description DescriptionContentImpl
     *
     */
    public ContentImpl(ThumbnailImpl thumbnail, DescriptionContentImpl description){
        this.thumbnail = thumbnail;
        this.DC = description;
    }
}
